
<!doctype html>
<html lang="zh" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      
      
      
        <meta name="author" content="OpsAny">
      
      
        <link rel="canonical" href="https://docs.opsany.com/ops-guide/install/">
      
      <link rel="icon" href="../../assets/favicon.ico">
      <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.6">
    
    
      
        <title>平台安装 - OpsAny 文档中心</title>
      
    
    
      <link rel="stylesheet" href="../../assets/stylesheets/main.875de78c.min.css">
      
        
        <link rel="stylesheet" href="../../assets/stylesheets/palette.f1a3b89f.min.css">
        
          
          
          <meta name="theme-color" content="#4cae4f">
        
      
    
    
    
      
        
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
        <style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</style>
      
    
    
    
    
      
    
    
  </head>
  
  
    
    
    
    
    
    <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="green" data-md-color-accent="">
  
    
    <script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
    
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" for="__drawer"></label>
    <div data-md-component="skip">
      
        
        <a href="#_1" class="md-skip">
          跳转至
        </a>
      
    </div>
    <div data-md-component="announce">
      
    </div>
    
      <header class="md-header" data-md-component="header">
  <nav class="md-header__inner md-grid" aria-label="Header">
    <a href="https://www.opsany.com/" title="OpsAny 文档中心" class="md-header__button md-logo" aria-label="OpsAny 文档中心" data-md-component="logo">
      
  <img src="../../assets/logo.png" alt="logo">

    </a>
    <label class="md-header__button md-icon" for="__drawer">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
    </label>
    <div class="md-header__title" data-md-component="header-title">
      <div class="md-header__ellipsis">
        <div class="md-header__topic">
          <span class="md-ellipsis">
            OpsAny 文档中心
          </span>
        </div>
        <div class="md-header__topic" data-md-component="header-topic">
          <span class="md-ellipsis">
            
              平台安装
            
          </span>
        </div>
      </div>
    </div>
    
    
      <div class="md-header__option">
        <div class="md-select">
          
          <button class="md-header__button md-icon">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v2h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04M18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12m-2.62 7 1.62-4.33L19.12 17h-3.24z"/></svg>
          </button>
          <div class="md-select__inner">
            <ul class="md-select__list">
              
                <li class="md-select__item">
                  <a href="https://docs.opsany.com/" hreflang="zh" class="md-select__link">
                    简体中文
                  </a>
                </li>
                
            </ul>
          </div>
        </div>
      </div>
    
    
      <label class="md-header__button md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
      </label>
      
<div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" aria-label="搜索" placeholder="搜索" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
      <label class="md-search__icon md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
      </label>
      <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
      </button>
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" data-md-scrollfix>
        <div class="md-search-result" data-md-component="search-result">
          <div class="md-search-result__meta">
            正在初始化搜索引擎
          </div>
          <ol class="md-search-result__list"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
    
    
  </nav>
</header>
    
    <div class="md-container" data-md-component="container">
      
      
        
          
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
  <div class="md-tabs__inner md-grid">
    <ul class="md-tabs__list">
      
        
  
  


  
  
  
    <li class="md-tabs__item">
      <a href="../.." class="md-tabs__link">
        主页
      </a>
    </li>
  

      
        
  
  


  
  
  
    <li class="md-tabs__item">
      <a href="../../getting-started/getting_started/" class="md-tabs__link">
        快速入门
      </a>
    </li>
  

      
        
  
  


  
  
  
    <li class="md-tabs__item">
      <a href="../../user-guide/workbench/" class="md-tabs__link">
        用户手册
      </a>
    </li>
  

      
        
  
  
    
  


  
  
  
    <li class="md-tabs__item">
      <a href="./" class="md-tabs__link md-tabs__link--active">
        运维手册
      </a>
    </li>
  

      
    </ul>
  </div>
</nav>
        
      
      <main class="md-main" data-md-component="main">
        <div class="md-main__inner md-grid">
          
            
              
              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    

  


<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
  <label class="md-nav__title" for="__drawer">
    <a href="https://www.opsany.com/" title="OpsAny 文档中心" class="md-nav__button md-logo" aria-label="OpsAny 文档中心" data-md-component="logo">
      
  <img src="../../assets/logo.png" alt="logo">

    </a>
    OpsAny 文档中心
  </label>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
      

  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_1" data-md-state="indeterminate" type="checkbox" id="__nav_1" checked>
      
      <label class="md-nav__link" for="__nav_1">
        主页
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="主页" data-md-level="1">
        <label class="md-nav__title" for="__nav_1">
          <span class="md-nav__icon md-icon"></span>
          主页
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
  
    <li class="md-nav__item">
      <a href="../.." class="md-nav__link">
        产品简介
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2" data-md-state="indeterminate" type="checkbox" id="__nav_2" checked>
      
      <label class="md-nav__link" for="__nav_2">
        快速入门
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="快速入门" data-md-level="1">
        <label class="md-nav__title" for="__nav_2">
          <span class="md-nav__icon md-icon"></span>
          快速入门
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../getting-started/getting_started/" class="md-nav__link">
        新手向导
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" data-md-state="indeterminate" type="checkbox" id="__nav_3" checked>
      
      <label class="md-nav__link" for="__nav_3">
        用户手册
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="用户手册" data-md-level="1">
        <label class="md-nav__title" for="__nav_3">
          <span class="md-nav__icon md-icon"></span>
          用户手册
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/workbench/" class="md-nav__link">
        工作台
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/cmdb/" class="md-nav__link">
        资源平台
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/control/" class="md-nav__link">
        管控平台
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/job/" class="md-nav__link">
        作业平台
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/monitor/" class="md-nav__link">
        监控平台
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/cmp/" class="md-nav__link">
        云管平台
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/devops/" class="md-nav__link">
        应用平台
      </a>
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../../user-guide/rbac/" class="md-nav__link">
        统一权限
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
    
  
  
    
    <li class="md-nav__item md-nav__item--active md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked>
      
      <label class="md-nav__link" for="__nav_4">
        运维手册
        <span class="md-nav__icon md-icon"></span>
      </label>
      <nav class="md-nav" aria-label="运维手册" data-md-level="1">
        <label class="md-nav__title" for="__nav_4">
          <span class="md-nav__icon md-icon"></span>
          运维手册
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
  
  
    
  
  
    <li class="md-nav__item md-nav__item--active">
      
      <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
      
      
        
      
      
        <label class="md-nav__link md-nav__link--active" for="__toc">
          平台安装
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <a href="./" class="md-nav__link md-nav__link--active">
        平台安装
      </a>
      
        
<nav class="md-nav md-nav--secondary" aria-label="目录">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      目录
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#_2" class="md-nav__link">
    部署主机配置
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_3" class="md-nav__link">
    平台部署场景
  </a>
  
    <nav class="md-nav" aria-label="平台部署场景">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_4" class="md-nav__link">
    内网部署，内网访问
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_5" class="md-nav__link">
    内网部署，公网访问
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_6" class="md-nav__link">
    部署服务明细
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#docker" class="md-nav__link">
    Docker容器在线部署
  </a>
  
    <nav class="md-nav" aria-label="Docker容器在线部署">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#opsany-paas" class="md-nav__link">
    部署OpsAny PaaS平台
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#opsany-saas" class="md-nav__link">
    部署OpsAny SAAS应用
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
      
    </li>
  

          
            
  
  
  
    <li class="md-nav__item">
      <a href="../help/" class="md-nav__link">
        常见问题
      </a>
    </li>
  

          
        </ul>
      </nav>
    </li>
  

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              
              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    
<nav class="md-nav md-nav--secondary" aria-label="目录">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      目录
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#_2" class="md-nav__link">
    部署主机配置
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_3" class="md-nav__link">
    平台部署场景
  </a>
  
    <nav class="md-nav" aria-label="平台部署场景">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_4" class="md-nav__link">
    内网部署，内网访问
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_5" class="md-nav__link">
    内网部署，公网访问
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_6" class="md-nav__link">
    部署服务明细
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#docker" class="md-nav__link">
    Docker容器在线部署
  </a>
  
    <nav class="md-nav" aria-label="Docker容器在线部署">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#opsany-paas" class="md-nav__link">
    部署OpsAny PaaS平台
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#opsany-saas" class="md-nav__link">
    部署OpsAny SAAS应用
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          <div class="md-content" data-md-component="content">
            <article class="md-content__inner md-typeset">
              
                
                
                <h1 id="_1">平台安装手册<a class="headerlink" href="#_1" title="Permanent link">&para;</a></h1>
<hr />
<p>OpsAny使用Docker进行部署，如果服务器可以访问外网，可以直接从镜像仓库拉取镜像。如果无法访问外网，需要部署内网的制品仓库，或者直接拷贝Docker镜像，本地导入。</p>
<hr />
<h2 id="_2">部署主机配置<a class="headerlink" href="#_2" title="Permanent link">&para;</a></h2>
<p>社区版部署，使用一台虚拟机即可，推荐使用4CPU和16G内存的主机，硬盘根据纳管的服务器数量综合考虑，例如100台主机，一年需要至少500G空间存储监控数据，日志数据另计。</p>
<table>
<thead>
<tr>
<th align="center">配置推荐</th>
<th align="center">操作系统</th>
<th align="center">主机配置</th>
<th align="center">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">最小配置</td>
<td align="center">CentOS 7.8</td>
<td align="center">2C、8G、50G</td>
<td align="center">关闭SELinux和防火墙</td>
</tr>
<tr>
<td align="center">推荐配置</td>
<td align="center">CentOS 7.8</td>
<td align="center">4C、16G、100G</td>
<td align="center">关闭SELinux和防火墙</td>
</tr>
</tbody>
</table>
<h2 id="_3">平台部署场景<a class="headerlink" href="#_3" title="Permanent link">&para;</a></h2>
<h3 id="_4">内网部署，内网访问<a class="headerlink" href="#_4" title="Permanent link">&para;</a></h3>
<p><strong>部署场景介绍：</strong> 平台部署在内网，仅管理内网主机，无法上公网。<br>
<strong>部署需求：</strong> <br>
需要内网可以访问到OpsAny平台的80、443、4505、4506、10051端口。</p>
<h3 id="_5">内网部署，公网访问<a class="headerlink" href="#_5" title="Permanent link">&para;</a></h3>
<p><strong>部署场景介绍</strong>：平台部署在内网，管理内网主机，同时也需要管理外网主机。<br>
<strong>部署需求</strong>：<br></p>
<ul>
<li>需要公网IP地址和域名，需要内网和公网均可以访问到OpsAny平台的80、443、4505、4506、10051。</li>
<li>在【管控平台】-【控制器】中需要设置外网和内网控制器地址。但是访问平台的地址只能三选一（域名、公网IP、内网IP），为了安全性，不支持内外网混合访问。建议使用域名。</li>
</ul>
<h3 id="_6">部署服务明细<a class="headerlink" href="#_6" title="Permanent link">&para;</a></h3>
<table>
    <tr>
        <th>序号</th> 
        <th>服务名称</th> 
        <th>监听端口</th>
        <th>备注</th>
   </tr>
    <tr>
        <td rowspan="6">基础服务</td>
        <td >OpenResty</td>  
        <td >80、443</td>
        <td >提供Web访问</td>
    </tr>
    <tr>
        <td >MySQL</td>  
        <td >3306</td>
        <td >提供数据存储</td>
    </tr>
    <tr>
        <td >MongoDB</td>  
        <td >27017</td>
        <td >提供文档型数据存储</td>
    </tr>
    <tr>
        <td >RabbitMQ</td>  
        <td >5672、15672</td>
        <td >提供消息队列服务</td>
    </tr>
    <tr>
        <td >Redis</td>  
        <td >6379</td>
        <td >提供缓存服务</td>
    </tr>
    <tr>
        <td >Elasticsearch</td>  
        <td >9200</td>
        <td >提供日志存储和搜索</td>
    </tr>
    <tr>
        <td rowspan="5">平台服务</td>
        <td >appengine</td>
        <td >8000</td>
        <td >SAAS服务支持</td>
    </tr>
    <tr>
        <td >paas</td>  
        <td >8001</td>
        <td >开发中心服务</td>
    </tr>
    <tr>
        <td >esb</td>  
        <td >8002</td>
        <td >企业服务总线</td>
    </tr>
    <tr>
        <td >login</td>  
        <td >8003</td>
        <td >统一登陆</td>
    </tr>
    <tr>
        <td >WebSocket</td>  
        <td >8004</td>
        <td >为堡垒机提供websocket</td>
    </tr>
    <tr>
        <td rowspan="6">应用服务</td>
        <td >Saltapi</td>  
        <td >8005</td>
        <td >提供远程执行和文件分发</td>
    </tr>
    <tr>
        <td >Zabbix</td>  
        <td >8006</td>
        <td >提供监控服务</td>
    </tr>
    <tr>
        <td >Grafana</td>  
        <td >8007</td>
        <td >提供可视化图表</td>
    </tr>
    <tr>
        <td >paasagent</td>  
        <td >4245、8085</td>
        <td >SAAS服务部署</td>
    </tr>
    <tr>
        <td >RDP-websocket</td>  
        <td >4822</td>
        <td >连接Windows服务器</td>
    </tr>
    <tr>
        <td >saltstack</td>  
        <td >4505、4506</td>
        <td >管控平台</td>
    </tr>
    <tr>
        <td >备注</td>
        <td colspan="3">管理外网主机，平台需要独立地址并对外端口：80、443、4505、4506、10051</td>  

    </tr>
</table>

<h2 id="docker">Docker容器在线部署<a class="headerlink" href="#docker" title="Permanent link">&para;</a></h2>
<h3 id="opsany-paas">部署OpsAny PaaS平台<a class="headerlink" href="#opsany-paas" title="Permanent link">&para;</a></h3>
<ol>
<li>
<p>安装Docker和初始化使用的软件包</p>
</li>
<li>
<p>【CentOS 7】部署</p>
</li>
</ol>
<p>安装Docker和MySQL</p>
<div class="highlight"><pre><span></span><code>curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install -y git wget docker-ce mariadb jq
systemctl enable --now docker
</code></pre></div>
<p>安装MongoDB客户端</p>
<div class="highlight"><pre><span></span><code>cat &gt; /etc/yum.repos.d/mongodb.repo &lt;&lt;&quot;EOF&quot;
[mongodb-org]
name=MongoDB Repository
#baseurl=https://mirrors.tuna.tsinghua.edu.cn/mongodb/yum/el$releasever/
baseurl=http://mirrors.cloud.tencent.com/mongodb/yum/el$releasever/
gpgcheck=0
enabled=1
EOF

yum install -y mongodb-org-shell mongodb-org-tools
</code></pre></div>
<ul>
<li>【CentOS 8】部署</li>
</ul>
<p>安装Docker和MySQL</p>
<div class="highlight"><pre><span></span><code>dnf config-manager --add-repo=http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
dnf -y install docker-ce --nobest
dnf -y install mariadb jq
systemctl enable --now docker
</code></pre></div>
<p>MongoDB客户端
  <div class="highlight"><pre><span></span><code>cat &gt; /etc/yum.repos.d/mongodb.repo &lt;&lt;&quot;EOF&quot;
[mongodb-org]
name=MongoDB Repository
#baseurl=https://mirrors.tuna.tsinghua.edu.cn/mongodb/yum/el$releasever/
baseurl=http://mirrors.cloud.tencent.com/mongodb/yum/el$releasever/
gpgcheck=0
enabled=1
EOF

yum install -y mongodb-org-shell mongodb-org-tools
</code></pre></div></p>
<ul>
<li>【Ubuntu】 安装Docker和MySQL、MongoDB客户端</li>
</ul>
<div class="highlight"><pre><span></span><code># step 1: 安装必要的一些系统工具
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
# step 2: 安装GPG证书
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# Step 3: 写入软件源信息
sudo add-apt-repository &quot;deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable&quot;
# Step 4: 更新并安装Docker-CE
sudo apt-get -y update
sudo apt-get -y install docker-ce jq wget mysql-client mongodb-clients git
systemctl enable --now docker
</code></pre></div>
<ol>
<li>克隆代码</li>
</ol>
<div class="highlight"><pre><span></span><code>cd /opt &amp;&amp; sudo git clone https://github.com/unixhot/opsany-paas.git
</code></pre></div>
<ol>
<li>修改安装配置</li>
</ol>
<div class="highlight"><pre><span></span><code>cd /opt/opsany-paas/install &amp;&amp; cp install.config.example install.config
vim /opt/opsany-paas/install/install.config

# 安装OpsAny的本机内网IP地址。
LOCAL_IP=&quot;192.168.56.11&quot;

# 访问OpsAny的域名，如果是在内网访问请修改为和LOCAL_IP一样，如果是外网访问，请修改为真实访问的域名或者公网IP。
安装后暂不支持修改，此配置会作为Cookie的作用域的域名，所以如果配置的和访问的不同，会导致无法通过验证。
DOMAIN_NAME=&quot;192.168.56.11&quot;
</code></pre></div>
<ol>
<li>执行安装脚本进行PAAS平台部署</li>
</ol>
<div class="highlight"><pre><span></span><code>cd /opt/opsany-paas/install/
./paas-install.sh 
</code></pre></div>
<ol>
<li>访问域名测试，默认用户名admin 密码admin</li>
</ol>
<p>http://192.168.56.11/</p>
<h3 id="opsany-saas">部署OpsAny SAAS应用<a class="headerlink" href="#opsany-saas" title="Permanent link">&para;</a></h3>
<blockquote>
<p>OpsAny SAAS的部署不区分离线或者在线，部署期间不需要联网。可以执行saas-install.sh进行自动部署。</p>
</blockquote>
<ol>
<li>
<p>下载OpsAny社区版软件包： https://www.opsany.com/#/download</p>
</li>
<li>
<p>解压并执行安装操作。</p>
</li>
</ol>
<div class="highlight"><pre><span></span><code>tar zxf opsany-saas.tar.gz
cd /opt/opsany-paas/
./saas-install.sh
</code></pre></div>
<ol>
<li>安装完毕之后，访问会提示设置License，请填写邮件中的License即可。</li>
</ol>
                
              
              
                


              
            </article>
          </div>
        </div>
        
          <a href="#" class="md-top md-icon" title="Back to top" data-md-component="top" data-md-state="hidden">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"/></svg>
          </a>
        
      </main>
      
        
<footer class="md-footer">
  
    <nav class="md-footer__inner md-grid" aria-label="Footer">
      
        <a href="../../user-guide/rbac/" class="md-footer__link md-footer__link--prev" rel="prev">
          <div class="md-footer__button md-icon">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
          </div>
          <div class="md-footer__title">
            <div class="md-ellipsis">
              <span class="md-footer__direction">
                上一页
              </span>
              统一权限
            </div>
          </div>
        </a>
      
      
        <a href="../help/" class="md-footer__link md-footer__link--next" rel="next">
          <div class="md-footer__title">
            <div class="md-ellipsis">
              <span class="md-footer__direction">
                下一页
              </span>
              常见问题
            </div>
          </div>
          <div class="md-footer__button md-icon">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
          </div>
        </a>
      
    </nav>
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-footer-copyright">
        
          <div class="md-footer-copyright__highlight">
            Copyright &copy; 2016 - 2021 OpsAny
          </div>
        
        
      </div>
      
  <div class="md-footer-social">
    
      
      
      <a href="https://github.com/unixhot/" target="_blank" rel="noopener" title="OpsAny on Github" class="md-footer-social__link">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
      </a>
    
  </div>

    </div>
  </div>
</footer>
      
    </div>
    <div class="md-dialog" data-md-component="dialog">
      <div class="md-dialog__inner md-typeset"></div>
    </div>
    <script id="__config" type="application/json">{"base": "../..", "features": ["search.highlight", "search.suggest", "navigation.sections", "navigation.tabs", "navigation.expand", "navigation.top"], "translations": {"clipboard.copy": "\u590d\u5236", "clipboard.copied": "\u5df2\u590d\u5236", "search.config.lang": "ja", "search.config.pipeline": "trimmer, stemmer", "search.config.separator": "[\\uff0c\\u3002]+", "search.placeholder": "\u641c\u7d22", "search.result.placeholder": "\u952e\u5165\u4ee5\u5f00\u59cb\u641c\u7d22", "search.result.none": "\u6ca1\u6709\u627e\u5230\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.one": "\u627e\u5230 1 \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.other": "# \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}, "search": "../../assets/javascripts/workers/search.d351de03.min.js", "version": null}</script>
    
    
      <script src="../../assets/javascripts/bundle.34eae1b6.min.js"></script>
      
    
  </body>
</html>